<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品列表 - 社交好物推荐平台</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        /* 基础样式 */
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: #f8f9fa;
            color: #343a40;
            line-height: 1.6;
        }
        
        /* 导航栏 */
        .navbar {
            background-color: white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            padding: 0.8rem 0;
        }
        
        .logo {
            font-weight: 700;
            font-size: 1.5rem;
            color: #2563eb;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .search-container {
            position: relative;
            max-width: 500px;
            width: 100%;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border: 1px solid #e2e8f0;
            border-radius: 24px;
            transition: all 0.2s;
        }
        
        .search-input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
        }
        
        /* 主内容区 */
        .main-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem 1rem;
        }
        
        .page-title {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: #1e293b;
        }
        
        .filters-section {
            background-color: white;
            border-radius: 8px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            margin-bottom: 2rem;
        }
        
        .filter-group {
            margin-bottom: 1.5rem;
        }
        
        .filter-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .filter-title i {
            color: #2563eb;
        }
        
        /* 分类筛选 */
        .category-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .category-chip {
            background-color: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 20px;
            padding: 5px 15px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .category-chip:hover, .category-chip.active {
            background-color: #2563eb;
            color: white;
            border-color: #2563eb;
        }
        
        /* 价格筛选 */
        .price-range {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .price-input {
            flex: 1;
            min-width: 100px;
            padding: 8px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
        }
        
        .price-separator {
            color: #94a3b8;
        }
        
        /* 评分筛选 */
        .rating-stars {
            display: flex;
            gap: 0.5rem;
        }
        
        .rating-option {
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            padding: 5px 10px;
            border-radius: 4px;
            transition: background-color 0.2s;
        }
        
        .rating-option:hover, .rating-option.active {
            background-color: #f1f5f9;
        }
        
        .star {
            color: #d1d5db;
        }
        
        .star.filled {
            color: #f59e0b;
        }
        
        /* 时间筛选 */
        .time-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .time-option {
            background-color: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .time-option:hover, .time-option.active {
            background-color: #2563eb;
            color: white;
            border-color: #2563eb;
        }
        
        /* 排序和视图切换 */
        .sort-view-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .sort-options {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .sort-label {
            font-weight: 500;
            color: #64748b;
        }
        
        .sort-select {
            padding: 6px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            background-color: white;
        }
        
        .view-options {
            display: flex;
            gap: 0.5rem;
        }
        
        .view-btn {
            background-color: white;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 6px 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .view-btn:hover, .view-btn.active {
            background-color: #2563eb;
            color: white;
            border-color: #2563eb;
        }
        
        /* 商品列表 */
        .products-section {
            background-color: white;
            border-radius: 8px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .product-count {
            color: #64748b;
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }
        
        /* 网格布局 */
        .grid-view {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
        }
        
        /* 列表布局 */
        .list-view {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        /* 商品卡片基础样式 */
        .product-card {
            border: 1px solid #f1f5f9;
            border-radius: 8px;
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s;
            display: flex;
            flex-direction: column;
        }
        
        .list-view .product-card {
            flex-direction: row;
        }
        
        .product-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        }
        
        .product-link {
            text-decoration: none;
            color: inherit;
        }
        
        .product-link:hover {
            color: #2563eb;
        }
        
        /* 商品图片 */
        .product-image {
            height: 200px;
            background-color: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        
        .list-view .product-image {
            width: 200px;
            flex-shrink: 0;
        }
        
        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }
        
        .product-card:hover .product-image img {
            transform: scale(1.05);
        }
        
        .product-image.no-image {
            color: #94a3b8;
            flex-direction: column;
        }
        
        .product-image.no-image i {
            font-size: 3rem;
            margin-bottom: 0.5rem;
        }
        
        /* 商品信息 */
        .product-info {
            padding: 1rem;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .list-view .product-info {
            padding: 1.5rem;
        }
        
        .product-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .list-view .product-title {
            font-size: 1.25rem;
            margin-bottom: 0.75rem;
            -webkit-line-clamp: 1;
        }
        
        .product-price {
            font-weight: 700;
            color: #dc2626;
            margin-bottom: 0.5rem;
        }
        
        .product-rating {
            display: flex;
            align-items: center;
            gap: 5px;
            margin-bottom: 0.75rem;
            font-size: 0.9rem;
        }
        
        .product-seller {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 1rem;
            font-size: 0.9rem;
            color: #64748b;
        }
        
        .seller-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .product-meta {
            display: flex;
            align-items: center;
            gap: 1rem;
            color: #94a3b8;
            font-size: 0.85rem;
            margin-top: auto;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 商品操作按钮 */
        .product-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        
        .list-view .product-actions {
            margin-top: 0;
        }
        
        .action-btn {
            background: none;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 5px 10px;
            color: #64748b;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .action-btn:hover {
            background-color: #f1f5f9;
            color: #2563eb;
        }
        
        .action-btn.primary {
            background-color: #2563eb;
            color: white;
            border-color: #2563eb;
        }
        
        .action-btn.primary:hover {
            background-color: #1d4ed8;
        }
        
        /* 筛选器折叠按钮 - 仅在移动设备显示 */
        .filter-toggle {
            display: none;
            background-color: #2563eb;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 10px 15px;
            margin-bottom: 1.5rem;
            width: 100%;
            text-align: center;
            cursor: pointer;
        }
        
        /* 分页 */
        .pagination-container {
            display: flex;
            justify-content: center;
            margin-top: 2rem;
        }
        
        .pagination {
            display: flex;
            gap: 0.5rem;
        }
        
        .page-btn {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            border: 1px solid #e2e8f0;
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .page-btn:hover {
            border-color: #2563eb;
            color: #2563eb;
        }
        
        .page-btn.active {
            background-color: #2563eb;
            color: white;
            border-color: #2563eb;
        }
        
        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
    
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .filter-toggle {
                display: block;
            }
            
            .filters-section {
                display: none;
            }
            
            .filters-section.show {
                display: block;
            }
        }
        
        @media (max-width: 768px) {
            .list-view .product-card {
                flex-direction: column;
            }
            
            .list-view .product-image {
                width: 100%;
            }
            
            .sort-view-controls {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .page-title {
                font-size: 1.75rem;
            }
        }
        
        @media (max-width: 576px) {
            .grid-view {
                grid-template-columns: 1fr;
            }
            
            .product-actions {
                flex-wrap: wrap;
            }
            
            .action-btn {
                flex: 1;
                justify-content: center;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a href="#" class="logo">
                <i class="fas fa-shopping-bag"></i>
                <span>好物圈</span>
            </a>
            
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent">
                <i class="fas fa-bars"></i>
            </button>
            
            <div class="collapse navbar-collapse justify-content-center" id="navbarContent">
                <div class="search-container">
                    <i class="fas fa-search search-icon"></i>
                    <input type="text" class="search-input" placeholder="搜索商品、品牌或卖家...">
                </div>
            </div>
            
            <div class="d-flex gap-3">
                <a href="#" class="nav-link" style="color: #343a40;">
                    <i class="fas fa-heart"></i>
                </a>
                <a href="#" class="nav-link" style="color: #343a40;">
                    <i class="fas fa-bell"></i>
                </a>
                <a href="#" class="nav-link" style="color: #343a40;">
                    <i class="fas fa-user-circle fa-lg"></i>
                </a>
            </div>
        </div>
    </nav>
    
    <!-- 主内容区 -->
    <div class="main-container">
        <h1 class="page-title">商品列表</h1>
        
        <!-- 移动端筛选器切换按钮 -->
        <button class="filter-toggle" id="filterToggle">
            <i class="fas fa-filter"></i> 筛选条件
        </button>
        
        <div class="row">
            <!-- 筛选侧边栏 -->
            <div class="col-lg-3 col-md-4">
                <div class="filters-section" id="filtersSection">
                    <!-- 分类筛选 -->
                    <div class="filter-group">
                        <h3 class="filter-title">
                            <i class="fas fa-th-large"></i> 商品分类
                        </h3>
                        <div class="category-chips">
                            <div class="category-chip active">全部</div>
                            <div class="category-chip">电子产品</div>
                            <div class="category-chip">家居用品</div>
                            <div class="category-chip">美妆护肤</div>
                            <div class="category-chip">服装鞋帽</div>
                            <div class="category-chip">美食零食</div>
                            <div class="category-chip">图书文具</div>
                            <div class="category-chip">运动户外</div>
                            <div class="category-chip">数码配件</div>
                            <div class="category-chip">宠物用品</div>
                        </div>
                    </div>
                    
                    <!-- 价格筛选 -->
                    <div class="filter-group">
                        <h3 class="filter-title">
                            <i class="fas fa-money-bill-wave"></i> 价格范围
                        </h3>
                        <div class="price-range">
                            <input type="number" class="price-input" placeholder="最低" min="0">
                            <span class="price-separator">-</span>
                            <input type="number" class="price-input" placeholder="最高" min="0">
                            <button class="action-btn primary" id="priceFilterBtn">确定</button>
                        </div>
                    </div>
                    
                    <!-- 评分筛选 -->
                    <div class="filter-group">
                        <h3 class="filter-title">
                            <i class="fas fa-star"></i> 商品评分
                        </h3>
                        <div class="rating-stars">
                            <div class="rating-option active">
                                <div class="stars">
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                </div>
                                <span>及以上</span>
                            </div>
                            <div class="rating-option">
                                <div class="stars">
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star"></i>
                                </div>
                                <span>及以上</span>
                            </div>
                            <div class="rating-option">
                                <div class="stars">
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star filled"></i>
                                    <i class="fas fa-star"></i>
                                    <i class="fas fa-star"></i>
                                </div>
                                <span>及以上</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 时间筛选 -->
                    <div class="filter-group">
                        <h3 class="filter-title">
                            <i class="fas fa-clock"></i> 发布时间
                        </h3>
                        <div class="time-options">
                            <div class="time-option active">全部时间</div>
                            <div class="time-option">今天</div>
                            <div class="time-option">近3天</div>
                            <div class="time-option">近一周</div>
                            <div class="time-option">近一个月</div>
                            <div class="time-option">近三个月</div>
                        </div>
                    </div>
                    
                    <!-- 其他筛选 -->
                    <div class="filter-group">
                        <h3 class="filter-title">
                            <i class="fas fa-sliders-h"></i> 其他筛选
                        </h3>
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" id="freeShipping">
                            <label class="form-check-label" for="freeShipping">
                                免费配送
                            </label>
                        </div>
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" id="hasDiscount">
                            <label class="form-check-label" for="hasDiscount">
                                有优惠
                            </label>
                        </div>
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" id="isRecommended">
                            <label class="form-check-label" for="isRecommended">
                                推荐商品
                            </label>
                        </div>
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" id="hasVideo">
                            <label class="form-check-label" for="hasVideo">
                                有视频介绍
                            </label>
                        </div>
                    </div>
                    
                    <!-- 筛选按钮 -->
                    <div class="d-flex gap-2">
                        <button class="action-btn primary" style="flex: 1;" id="applyFilters">
                            <i class="fas fa-check"></i> 应用筛选
                        </button>
                        <button class="action-btn" style="flex: 1;" id="resetFilters">
                            <i class="fas fa-redo"></i> 重置
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 商品列表区域 -->
            <div class="col-lg-9 col-md-8">
                <div class="products-section">
                    <!-- 排序和视图切换 -->
                    <div class="sort-view-controls">
                        <div class="sort-options">
                            <span class="sort-label">排序方式：</span>
                            <select class="sort-select" id="sortSelect">
                                <option value="recommended">推荐排序</option>
                                <option value="price-asc">价格从低到高</option>
                                <option value="price-desc">价格从高到低</option>
                                <option value="newest">最新发布</option>
                                <option value="popular">热门程度</option>
                                <option value="rating">评分最高</option>
                            </select>
                        </div>
                        
                        <div class="view-options">
                            <button class="view-btn active" data-view="grid" id="gridViewBtn">
                                <i class="fas fa-th"></i> 网格
                            </button>
                            <button class="view-btn" data-view="list" id="listViewBtn">
                                <i class="fas fa-list"></i> 列表
                            </button>
                        </div>
                    </div>
                    
                    <!-- 商品数量 -->
                    <div class="product-count">
                        找到 <strong>248</strong> 个符合条件的商品
                    </div>
                    
                    <!-- 商品列表 -->
                    <div class="products-container grid-view" id="productsContainer">
                        <!-- 商品1 - 有图 -->
                        <div class="product-card">
                            <a href="#" class="product-link">
                                <div class="product-image">
                                    <img src="https://picsum.photos/400/300?random=1" alt="无线蓝牙耳机" class="img-fluid">
                                </div>
                                <div class="product-info">
                                    <h3 class="product-title">无线蓝牙耳机 主动降噪 长续航 高清音质</h3>
                                    <div class="product-price">¥399.00</div>
                                    <div class="product-rating">
                                        <div class="stars">
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star-half-alt filled"></i>
                                        </div>
                                        <span>4.5 (128)</span>
                                    </div>
                                    <div class="product-seller">
                                        <img src="https://picsum.photos/100/100?random=101" alt="数码专营店" class="seller-avatar">
                                        <span>数码专营店</span>
                                    </div>
                                    <div class="product-meta">
                                        <div class="meta-item">
                                            <i class="fas fa-eye"></i>
                                            <span>3.2k</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="fas fa-heart"></i>
                                            <span>568</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="far fa-calendar-alt"></i>
                                            <span>3天前</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <div class="product-actions">
                                <button class="action-btn primary">
                                    <i class="fas fa-shopping-cart"></i> 购买
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                </button>
                            </div>
                        </div>
                        
                        <!-- 商品2 - 无图 -->
                        <div class="product-card">
                            <a href="#" class="product-link">
                                <div class="product-image no-image">
                                    <i class="fas fa-book"></i>
                                    <div>暂无图片</div>
                                </div>
                                <div class="product-info">
                                    <h3 class="product-title">Python编程从入门到实践 第二版 畅销编程书籍</h3>
                                    <div class="product-price">¥79.00</div>
                                    <div class="product-rating">
                                        <div class="stars">
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                        </div>
                                        <span>5.0 (86)</span>
                                    </div>
                                    <div class="product-seller">
                                        <img src="https://picsum.photos/100/100?random=102" alt="知识书店" class="seller-avatar">
                                        <span>知识书店</span>
                                    </div>
                                    <div class="product-meta">
                                        <div class="meta-item">
                                            <i class="fas fa-eye"></i>
                                            <span>1.8k</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="fas fa-heart"></i>
                                            <span>324</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="far fa-calendar-alt"></i>
                                            <span>1周前</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <div class="product-actions">
                                <button class="action-btn primary">
                                    <i class="fas fa-shopping-cart"></i> 购买
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                </button>
                            </div>
                        </div>
                        
                        <!-- 商品3 - 有图 -->
                        <div class="product-card">
                            <a href="#" class="product-link">
                                <div class="product-image">
                                    <img src="https://picsum.photos/400/300?random=3" alt="纯棉T恤" class="img-fluid">
                                </div>
                                <div class="product-info">
                                    <h3 class="product-title">纯棉宽松T恤 男女同款 多色可选 夏季新款</h3>
                                    <div class="product-price">¥69.00</div>
                                    <div class="product-rating">
                                        <div class="stars">
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star"></i>
                                        </div>
                                        <span>4.0 (215)</span>
                                    </div>
                                    <div class="product-seller">
                                        <img src="https://picsum.photos/100/100?random=103" alt="时尚衣橱" class="seller-avatar">
                                        <span>时尚衣橱</span>
                                    </div>
                                    <div class="product-meta">
                                        <div class="meta-item">
                                            <i class="fas fa-eye"></i>
                                            <span>5.7k</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="fas fa-heart"></i>
                                            <span>987</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="far fa-calendar-alt"></i>
                                            <span>2天前</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <div class="product-actions">
                                <button class="action-btn primary">
                                    <i class="fas fa-shopping-cart"></i> 购买
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                </button>
                            </div>
                        </div>
                        
                        <!-- 商品4 - 有图 -->
                        <div class="product-card">
                            <a href="#" class="product-link">
                                <div class="product-image">
                                    <img src="https://picsum.photos/400/300?random=4" alt="智能手表" class="img-fluid">
                                </div>
                                <div class="product-info">
                                    <h3 class="product-title">智能手表 心率监测 运动计步 睡眠分析 长续航</h3>
                                    <div class="product-price">¥299.00</div>
                                    <div class="product-rating">
                                        <div class="stars">
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star"></i>
                                            <i class="fas fa-star"></i>
                                        </div>
                                        <span>3.0 (76)</span>
                                    </div>
                                    <div class="product-seller">
                                        <img src="https://picsum.photos/100/100?random=104" alt="智能设备店" class="seller-avatar">
                                        <span>智能设备店</span>
                                    </div>
                                    <div class="product-meta">
                                        <div class="meta-item">
                                            <i class="fas fa-eye"></i>
                                            <span>2.4k</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="fas fa-heart"></i>
                                            <span>412</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="far fa-calendar-alt"></i>
                                            <span>5天前</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <div class="product-actions">
                                <button class="action-btn primary">
                                    <i class="fas fa-shopping-cart"></i> 购买
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                </button>
                            </div>
                        </div>
                        
                        <!-- 商品5 - 有图 -->
                        <div class="product-card">
                            <a href="#" class="product-link">
                                <div class="product-image">
                                    <img src="https://picsum.photos/400/300?random=5" alt="保温杯" class="img-fluid">
                                </div>
                                <div class="product-info">
                                    <h3 class="product-title">不锈钢保温杯 大容量 男女通用 便携车载水杯</h3>
                                    <div class="product-price">¥89.00</div>
                                    <div class="product-rating">
                                        <div class="stars">
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star-half-alt filled"></i>
                                        </div>
                                        <span>4.7 (156)</span>
                                    </div>
                                    <div class="product-seller">
                                        <img src="https://picsum.photos/100/100?random=105" alt="家居生活馆" class="seller-avatar">
                                        <span>家居生活馆</span>
                                    </div>
                                    <div class="product-meta">
                                        <div class="meta-item">
                                            <i class="fas fa-eye"></i>
                                            <span>3.8k</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="fas fa-heart"></i>
                                            <span>623</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="far fa-calendar-alt"></i>
                                            <span>10天前</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <div class="product-actions">
                                <button class="action-btn primary">
                                    <i class="fas fa-shopping-cart"></i> 购买
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                </button>
                            </div>
                        </div>
                        
                        <!-- 商品6 - 无图 -->
                        <div class="product-card">
                            <a href="#" class="product-link">
                                <div class="product-image no-image">
                                    <i class="fas fa-utensils"></i>
                                    <div>暂无图片</div>
                                </div>
                                <div class="product-info">
                                    <h3 class="product-title">进口咖啡豆 中度烘焙 现磨咖啡粉 250g/袋</h3>
                                    <div class="product-price">¥68.00</div>
                                    <div class="product-rating">
                                        <div class="stars">
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star filled"></i>
                                            <i class="fas fa-star"></i>
                                        </div>
                                        <span>4.2 (67)</span>
                                    </div>
                                    <div class="product-seller">
                                        <img src="https://picsum.photos/100/100?random=106" alt="咖啡时光" class="seller-avatar">
                                        <span>咖啡时光</span>
                                    </div>
                                    <div class="product-meta">
                                        <div class="meta-item">
                                            <i class="fas fa-eye"></i>
                                            <span>1.5k</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="fas fa-heart"></i>
                                            <span>289</span>
                                        </div>
                                        <div class="meta-item">
                                            <i class="far fa-calendar-alt"></i>
                                            <span>2周前</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <div class="product-actions">
                                <button class="action-btn primary">
                                    <i class="fas fa-shopping-cart"></i> 购买
                                </button>
                                <button class="action-btn">
                                    <i class="far fa-heart"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 分页 -->
                    <div class="pagination-container">
                        <div class="pagination">
                            <button class="page-btn disabled">
                                <i class="fas fa-chevron-left"></i>
                            </button>
                            <button class="page-btn active">1</button>
                            <button class="page-btn">2</button>
                            <button class="page-btn">3</button>
                            <button class="page-btn">4</button>
                            <button class="page-btn">5</button>
                            <button class="page-btn">
                                <i class="fas fa-chevron-right"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    

    
    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>

        
        // 移动端筛选器切换
        const filterToggle = document.getElementById('filterToggle');
        const filtersSection = document.getElementById('filtersSection');
        
        filterToggle.addEventListener('click', () => {
            filtersSection.classList.toggle('show');
        });
        
        // 分类筛选
        const categoryChips = document.querySelectorAll('.category-chip');
        categoryChips.forEach(chip => {
            chip.addEventListener('click', () => {
                categoryChips.forEach(c => c.classList.remove('active'));
                chip.classList.add('active');
                showNotification(`已选择 ${chip.textContent} 分类`);
            });
        });
        
        // 评分筛选
        const ratingOptions = document.querySelectorAll('.rating-option');
        ratingOptions.forEach(option => {
            option.addEventListener('click', () => {
                ratingOptions.forEach(o => o.classList.remove('active'));
                option.classList.add('active');
                
                const stars = option.querySelector('.stars').innerHTML;
                if (stars.includes('5')) {
                    showNotification('已筛选 5星及以上 商品');
                } else if (stars.includes('4')) {
                    showNotification('已筛选 4星及以上 商品');
                } else if (stars.includes('3')) {
                    showNotification('已筛选 3星及以上 商品');
                }
            });
        });
        
        // 时间筛选
        const timeOptions = document.querySelectorAll('.time-option');
        timeOptions.forEach(option => {
            option.addEventListener('click', () => {
                timeOptions.forEach(o => o.classList.remove('active'));
                option.classList.add('active');
                showNotification(`已筛选 ${option.textContent} 发布的商品`);
            });
        });
        
        // 视图切换
        const gridViewBtn = document.getElementById('gridViewBtn');
        const listViewBtn = document.getElementById('listViewBtn');
        const productsContainer = document.getElementById('productsContainer');
        
        gridViewBtn.addEventListener('click', () => {
            gridViewBtn.classList.add('active');
            listViewBtn.classList.remove('active');
            productsContainer.classList.remove('list-view');
            productsContainer.classList.add('grid-view');
            showNotification('已切换到网格视图');
        });
        
        listViewBtn.addEventListener('click', () => {
            listViewBtn.classList.add('active');
            gridViewBtn.classList.remove('active');
            productsContainer.classList.remove('grid-view');
            productsContainer.classList.add('list-view');
            showNotification('已切换到列表视图');
        });
        
        // 排序方式
        const sortSelect = document.getElementById('sortSelect');
        sortSelect.addEventListener('change', () => {
            const options = {
                'recommended': '推荐排序',
                'price-asc': '价格从低到高',
                'price-desc': '价格从高到低',
                'newest': '最新发布',
                'popular': '热门程度',
                'rating': '评分最高'
            };
            showNotification(`已按 ${options[sortSelect.value]} 排序`);
        });
        
        // 价格筛选按钮
        const priceFilterBtn = document.getElementById('priceFilterBtn');
        priceFilterBtn.addEventListener('click', () => {
            const minInput = document.querySelector('.price-input[placeholder="最低"]');
            const maxInput = document.querySelector('.price-input[placeholder="最高"]');
            
            let message = '已筛选价格：';
            if (minInput.value && maxInput.value) {
                message += `¥${minInput.value} - ¥${maxInput.value}`;
            } else if (minInput.value) {
                message += `¥${minInput.value} 及以上`;
            } else if (maxInput.value) {
                message += `¥${maxInput.value} 及以下`;
            } else {
                message = '请输入价格范围';
            }
            
            showNotification(message);
        });
        
        // 应用筛选按钮
        const applyFiltersBtn = document.getElementById('applyFilters');
        applyFiltersBtn.addEventListener('click', () => {
            // 获取当前筛选条件
            const activeCategory = document.querySelector('.category-chip.active').textContent;
            const priceMin = document.querySelector('.price-input[placeholder="最低"]').value || '无';
            const priceMax = document.querySelector('.price-input[placeholder="最高"]').value || '无';
            
            // 在实际应用中，这里会根据筛选条件发送请求获取数据
            showNotification(`已应用筛选条件：${activeCategory}，价格范围 ${priceMin}-${priceMax}`);
            
            // 在移动设备上自动隐藏筛选面板
            if (window.innerWidth <= 992) {
                filtersSection.classList.remove('show');
            }
        });
        
        // 重置筛选按钮
        const resetFiltersBtn = document.getElementById('resetFilters');
        resetFiltersBtn.addEventListener('click', () => {
            // 重置所有筛选条件
            document.querySelectorAll('.category-chip').forEach(chip => {
                chip.classList.remove('active');
                if (chip.textContent === '全部') chip.classList.add('active');
            });
            
            document.querySelectorAll('.price-input').forEach(input => {
                input.value = '';
            });
            
            document.querySelectorAll('.rating-option').forEach(option => {
                option.classList.remove('active');
                if (option.querySelector('.stars').innerHTML.includes('5')) {
                    option.classList.add('active');
                }
            });
            
            document.querySelectorAll('.time-option').forEach(option => {
                option.classList.remove('active');
                if (option.textContent === '全部时间') option.classList.add('active');
            });
            
            document.querySelectorAll('.form-check-input').forEach(checkbox => {
                checkbox.checked = false;
            });
            
            sortSelect.value = 'recommended';
            
            showNotification('已重置所有筛选条件');
        });
        
        // 分页按钮
        const pageBtns = document.querySelectorAll('.page-btn:not(.disabled)');
        pageBtns.forEach(btn => {
            if (!btn.innerHTML.includes('chevron')) { // 排除箭头按钮
                btn.addEventListener('click', () => {
                    pageBtns.forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    showNotification(`已切换到第 ${btn.textContent} 页`);
                });
            }
        });
        
        // 点赞按钮
        document.querySelectorAll('.action-btn:has(.far.fa-heart)').forEach(button => {
            button.addEventListener('click', function(e) {
                e.preventDefault();
                const icon = this.querySelector('i');
                
                if (icon.classList.contains('far')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    showNotification('点赞成功');
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    showNotification('取消点赞');
                }
            });
        });
        
        // 复选框筛选
        document.querySelectorAll('.form-check-input').forEach(checkbox => {
            checkbox.addEventListener('change', function() {
                const label = this.nextElementSibling.textContent.trim();
                if (this.checked) {
                    showNotification(`已筛选：${label}`);
                } else {
                    showNotification(`已取消筛选：${label}`);
                }
            });
        });
    </script>
</body>
</html>
    
